#include <iostream>
#include <algorithm>
#include <string>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <set>
using namespace std;
struct ListNode
{
    int val;
    ListNode *next;
    ListNode(int x) : val(x), next(NULL) {}
};
//TODO
class Solution
{
public:
    ListNode *detectCycle(ListNode *head)
    {
        ListNode *ptr = nullptr;

    }
};